package yl.hs.bmipfull.daos.equipment;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import yl.hs.bmipfull.daos.BaseDao;
import yl.hs.bmipfull.pojo.equipment.EquipmentEntity;
import yl.hs.bmipfull.pojo.equipment.EquipmentLogEntity;

import java.util.List;
import java.util.Map;

/*
 * IEquipmentDAO
 * @category
 * @author 谢景广
 * @date 2022-11-14
 */
@Repository
public interface IEquipmentDAO extends BaseDao<EquipmentEntity> {

    int queryCountByCondition(@Param("map") Map<String, Object> query, List<Map<String, Object>> filters);

    List<EquipmentEntity> queryListByCondition(@Param("map")Map<String, Object> query, List<Map<String, Object>> filters);

    Integer changeState(@Param("snArray") String[] snArray, int state);

    @MapKey("sn")
    List<Map<String, Object>> queryEquipmentMRRecord(@Param("equipmentSN") String equipmentSN);

    List<EquipmentEntity> queryAllEquipment();

    List<EquipmentEntity> queryByorderSn(String sn);
}
